import math
def ec(*num):
    a,b,c = (input("请输入你要求的二次方程的系数：").split())
    a = int(a)
    b = int(b)
    c = int(c)
    x = b**2-4*a*c
    if x < 0:
        print("该方程无解")
        return("测试失败，该方程无解")
    else:
        x1 = (-b-math.sqrt(x))/(2*a)
        x2 = (-b+math.sqrt(x))/(2*a)
        print("该方程有解")
        return(f"该方程的两个解为{x1:.1f},{x2:.1f}")
